Skip to content

fix: fetch token scope from discovery endpoint #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 11, 2025
Merged

Conversation

mortenpi
Copy link
Member

Fetches the scope= value of the device token from the configuration endpoint (device_token_scope property). If that is not set, we assume that scope= should not be passed (it's optional according to RFC 8628). X-ref: #42 (comment)

@mortenpi mortenpi requested review from tanmaykm and nkottary June 10, 2025 18:59
@nkottary
Copy link
Member

@mortenpi Would be good to update device_token_scope in the tests as well:

"device_token_endpoint": "http://localhost:$PORT/auth/token"

@mortenpi
Copy link
Member Author

@nkottary I updated the tests. I also added a new set that tests the case where device_token_scope is unset. We could also check that PkgAuthentication also correctly sets (or doesn't set) scope= in the device request body, but I think it's not critical.

@mortenpi mortenpi enabled auto-merge (squash) June 11, 2025 09:38
@mortenpi mortenpi merged commit 3a4702a into master Jun 11, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants